package com.alpha.crm;

import com.alpha.crm.R;

import android.app.Activity;
import android.os.Bundle;
//import android.text.Editable;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class Calendari extends Activity {
	public static String ip1;
	//public final static String ip2=null;
	Button btnip;
	EditText iptx;
	//public static String ip1;
	//public static Editable ip1;

		/**
	 * @see android.app.Activity#onCreate(Bundle)
	 */
    
	
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		
		 
		super.onCreate(savedInstanceState);
		// TODO Put your code here
			
	//	final EditText iptx = (EditText)findViewById(R.id.editTextip);
		setContentView(R.layout.menu_question);
		btnip = (Button)findViewById(R.id.button1);	
		final TextView tv;
       	tv = (TextView) findViewById(R.id.textView2);
       	
       	EditText iptx = (EditText)findViewById(R.id.editTextip);
		//EditText.setText(Question.URL, TextView.BufferType.EDITABLE);
		
		iptx.setText("http://192.168.1.246/Ebs2Alpha/Service.asmx");
       	
		
		btnip.setOnClickListener(new View.OnClickListener()
        {
        	
        	
        	
           
            
            	 /*   	String ip1;
            	TextView tv;
           	tv = (TextView) findViewById(R.id.textView2);
            	
           	ip1 = iptx.getText().toString();
       		tv.setText("your IP is : "+ ip1 );
          	try {
           		
	        
	        } catch (Exception e) {
		    	  tv.setText("error: " + e);
		            e.printStackTrace();
		      }
           	*/
           	
		

			 public  void onClick(View v) {
				// TODO Auto-generated method stub
				
				 EditText iptx = (EditText)findViewById(R.id.editTextip);
				 
		        	ip1 = iptx.getText().toString();
		       		tv.setText("your URL server is : "+ ip1 );
            	
           	         	    		
				
		       		//ip1= ip2;
			}
			 
}
);
		
}
}